Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add compatibility check in KMP while fetching certs/keys [multi-tenancy PR 6] #1395

Merged
merged 7 commits into from
Apr 25, 2024

Conversation

binbin-li
Copy link
Collaborator

@binbin-li binbin-li commented Apr 15, 2024

Description

What this PR does / why we need it:

This is the 6th PR for multi-tenancy support. Please review #1382 first. Check diff between PR 5 and PR 6 at: binbin-li#121

  1. Add context.Context to GetCerts and GetKeys methods so that it can fetch the namespace and check the compatibility of verifier against trust store.
  2. Add missing DeleteKeysFromMap step in controller.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):

Fixes #

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Helm Chart Change (any edit/addition/update that is necessary for changes merged to the main branch)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • Does the affected code have corresponding tests?
  • Are the changes documented, not just with inline documentation, but also with conceptual documentation such as an overview of a new feature, or task-based documentation like a tutorial? Consider if this change should be announced on your project blog.
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have appropriate license header?

Post Merge Requirements

  • MAINTAINERS: manually trigger the "Publish Package" workflow after merging any PR that indicates Helm Chart Change

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 8 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (dev@c5f252d). Click here to learn what that means.

❗ Current head 05e34fa differs from pull request most recent head 5dc63d0. Consider uploading reports for the commit 5dc63d0 to get more accurate results

Files Patch % Lines
...kg/controllers/keymanagementprovider_controller.go 42.85% 4 Missing ⚠️
pkg/keymanagementprovider/keymanagementprovider.go 50.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             dev    #1395   +/-   ##
======================================
  Coverage       ?   65.53%           
======================================
  Files          ?      109           
  Lines          ?     5586           
  Branches       ?        0           
======================================
  Hits           ?     3661           
  Misses         ?     1568           
  Partials       ?      357           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@binbin-li binbin-li force-pushed the multi-tenancy-pr-6 branch from 6596383 to a468944 Compare April 16, 2024 06:15
@binbin-li binbin-li changed the title [WIP] feat: add KMPManager interface to wrap operations on namespaced kmp [multi-tenancy PR 5] [WIP] feat: add KMPManager interface to wrap operations on namespaced kmp [multi-tenancy PR 6] Apr 16, 2024
@binbin-li binbin-li force-pushed the multi-tenancy-pr-6 branch from a468944 to 8bc8bed Compare April 16, 2024 09:13
@binbin-li binbin-li changed the title [WIP] feat: add KMPManager interface to wrap operations on namespaced kmp [multi-tenancy PR 6] feat: add KMPCertManager/KMPKeyManager interface to wrap operations on namespaced kmp [multi-tenancy PR 6] Apr 16, 2024
@binbin-li binbin-li force-pushed the multi-tenancy-pr-6 branch 3 times, most recently from e6eff7c to 226d4fc Compare April 17, 2024 06:27
@binbin-li binbin-li force-pushed the multi-tenancy-pr-6 branch from 226d4fc to fc895c4 Compare April 19, 2024 12:43
@binbin-li binbin-li force-pushed the multi-tenancy-pr-6 branch from fc895c4 to c0b5769 Compare April 19, 2024 13:14
@binbin-li binbin-li changed the title feat: add KMPCertManager/KMPKeyManager interface to wrap operations on namespaced kmp [multi-tenancy PR 6] feat: add compatibility check in KMP while fetching certs/keys [multi-tenancy PR 6] Apr 22, 2024
akashsinghal
akashsinghal previously approved these changes Apr 24, 2024
@binbin-li
Copy link
Collaborator Author

Rebased to resolve conflicts.

@binbin-li
Copy link
Collaborator Author

Added context to GetKeys so that namespace could be passed to trustPolicy.

@binbin-li binbin-li merged commit 3d40b97 into ratify-project:dev Apr 25, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants